package com.minimalist.common.config.bucket;

import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.prometheusmetrics.PrometheusConfig;
import io.micrometer.prometheusmetrics.PrometheusMeterRegistry;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 11987
 */
@Configuration
public class MetricsConfig{

    /**
     * 配置 Prometheus MeterRegistry Bean
     * 用于支持 DynamicRateLimitInterceptor 的依赖注入
     */
    @Bean
    public MeterRegistry meterRegistry(){
        return new PrometheusMeterRegistry(PrometheusConfig.DEFAULT);
    }
}
